package mse.eai.jbpm.dailyDigestProcess;

import java.util.Map;
import java.util.Map.Entry;

import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;

public class PrintRequest implements ActionHandler {

	@Override
	public void execute(ExecutionContext context) throws Exception {

		System.out.println("----------------------------------");
		
		
		Map<Integer,String> mapOfEmails = (Map<Integer,String>) context.getVariable("MapOfEmails");
		
		for(Entry<Integer, String> entry : mapOfEmails.entrySet())
		{
			
			System.out.println("EMAIL ADDRESS: "+entry.getKey());
			System.out.println("EMAIL TEXT: "+entry.getValue());

		}
		
		
		System.out.println("----------------------------------");
		
		context.leaveNode();
		
		
	}

}
